# Maintainer: Hendra Manudinata <hendra@manoedinata.com>
# Reference: <https://postmarketos.org/devicepkg>
pkgname=device-samsung-j4lte
pkgdesc="Samsung Galaxy J4"
pkgver=1
pkgrel=0
url="https://postmarketos.org"
license="MIT"
arch="aarch64"
options="!check !archcheck"
depends="
	linux-samsung-j4lte
	mkbootimg
	postmarketos-base
	postmarketos-base-downstream
	msm-fb-refresher
"
makedepends="devicepkg-dev"
source="
	deviceinfo
"
subpackages="$pkgname-nonfree-firmware:nonfree_firmware"

build() {
	devicepkg_build $startdir $pkgname
}

package() {
	devicepkg_package $startdir $pkgname
}

nonfree_firmware() {
	pkgdesc="Non-free firmware for Samsung Galaxy J4 (j4lte)"
	depends="firmware-samsung-j4lte"
	mkdir "$subpkgdir"
}

sha512sums="
6cd6bd78a3dd54505bbf4936a7496a295f2e22f703267dcab7cd6d1c5872de77a49bfc4a9012fa50691b559cc76842497ac472662a2558aee2f217999a21f25e  deviceinfo
"
